package com.ceair.flight.refund.util;

import org.springframework.util.StringUtils;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class StringUtil {
 public final static String SEPARATOR="!@!";
 public final static String DATEFORMATE="yyyy-MM-dd HH:mm:ss";
 
 	public static String replaceBlank(String str) {
		String dest = "";
		if (str!=null) {
			Pattern p = Pattern.compile("\\s*|\t|\r|\n|\r\n");
			Matcher m = p.matcher(str);
			dest = m.replaceAll("");
		}
		return dest;
	}

	public static boolean isBlank(String str){
 		if (null == str){
 			return true;
		}
		return StringUtils.isEmpty(str.trim());
	}


}
